package Day02_java流程控制.Java10_逻辑结构.循环结构.for循环;
public class for循环练习1 {
    public static void main(String[] args) {
        //练习1：计算0到100之间的奇数和偶数的和
        int oddSum = 0;
        int eveSum = 0;
        for (int i = 0; i < 100; i++) {
            if (i % 2 != 0){
                oddSum+=i;
            }else {
                eveSum+=i;
            }
        }
        System.out.println("奇数的和" + oddSum);
        System.out.println("偶数的和" + eveSum);
    }
}
